package com.ruoyi.club.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.club.mapper.ClubApplicationMapper;
import com.ruoyi.club.domain.ClubApplication;
import com.ruoyi.club.service.IClubApplicationService;

/**
 * 社团报名申请Service业务层处理
 * 
 * @author Zou
 * @date 2025-11-14
 */
@Service
public class ClubApplicationServiceImpl implements IClubApplicationService 
{
    @Autowired
    private ClubApplicationMapper clubApplicationMapper;

    /**
     * 查询社团报名申请
     * 
     * @param id 社团报名申请主键
     * @return 社团报名申请
     */
    @Override
    public ClubApplication selectClubApplicationById(Long id)
    {
        return clubApplicationMapper.selectClubApplicationById(id);
    }

    /**
     * 查询社团报名申请列表
     * 
     * @param clubApplication 社团报名申请
     * @return 社团报名申请
     */
    @Override
    public List<ClubApplication> selectClubApplicationList(ClubApplication clubApplication)
    {
        return clubApplicationMapper.selectClubApplicationList(clubApplication);
    }

    /**
     * 新增社团报名申请
     * 
     * @param clubApplication 社团报名申请
     * @return 结果
     */
    @Override
    public int insertClubApplication(ClubApplication clubApplication)
    {
        clubApplication.setCreateTime(DateUtils.getNowDate());
        return clubApplicationMapper.insertClubApplication(clubApplication);
    }

    /**
     * 修改社团报名申请
     * 
     * @param clubApplication 社团报名申请
     * @return 结果
     */
    @Override
    public int updateClubApplication(ClubApplication clubApplication)
    {
        clubApplication.setUpdateTime(DateUtils.getNowDate());
        return clubApplicationMapper.updateClubApplication(clubApplication);
    }

    /**
     * 批量删除社团报名申请
     * 
     * @param ids 需要删除的社团报名申请主键
     * @return 结果
     */
    @Override
    public int deleteClubApplicationByIds(Long[] ids)
    {
        return clubApplicationMapper.deleteClubApplicationByIds(ids);
    }

    /**
     * 删除社团报名申请信息
     * 
     * @param id 社团报名申请主键
     * @return 结果
     */
    @Override
    public int deleteClubApplicationById(Long id)
    {
        return clubApplicationMapper.deleteClubApplicationById(id);
    }
}
